<!-- 1 X 1 -->
<template>
  <div class="main_compent">
    <div class="box_site11">

<!--      <PlayerContainer
        :ref="PlayerContainer1"
        :playerRef="playerRef"
        :deviceCode="deviceCode"
        :playParam="playParam"
      />-->
      <RtcWithTalkPlayer
        ref="rtcWithTalkPlayer1"
        videoId = "playerRef"
      ></RtcWithTalkPlayer>
    </div>
  </div>
</template>
<script>
import PlayerContainer from "@/view/Home/Moudle/multiscreenplay/PlayerContainer";
import RtcWithTalkPlayer from '@/view/Home/component/RtcWithTalkPlayer.vue'
export default {
  components:{PlayerContainer,RtcWithTalkPlayer},
  data(){
    return{
      playerRef:"player1x1-01",
      PlayerContainer1:"PlayerContainer1",
      deviceCode:"未设置",
      playParam:{  //jessibuca 才需要
        protocol: "flv",
        pringLog:false,
        isDebug:true,
        isFlv:true,
        videoBuffer:0.2, //缓存时长
        videoBufferDelay:1,
        useMSE:true,//MediaSource
        useSIMD:false, //WASM(SIMD)
        useWCS:false, //Webcodec
        useSIMDMThreading:false,//启动多线程（WASM,WASM(SIMD)解码支持）
        showOperateBtns: true, // 显示网速
        forceNoOffscreen: true, //显示性能
        renderDom:"video",
        isUseWebGPU:'webgpu',//webgl
        demuxUseWorker:false,//硬解码(MediaSource，Webcodec)worker解封装
      },
      deviceData: null
    }
  },
  methods:{
    /** 给父组件 播放调用 */
    play(videoUrl,deviceId,channelId){
      this.$refs.PlayerContainer1.play(videoUrl,deviceId,channelId);
    },

    openDialog(data){

      this.deviceData = data;
      this.$refs.rtcWithTalkPlayer1.openDialog(
        data.arrt.deviceCode,
        data.arrt.channelCode,
        null,
        data.arrt.devName);
    }
  },
  beforeDestroy(){
    console.log("*****MultiScr1X1 destroy*******");
  },
  mounted() {
    /*this.$nextTick(() => {
      this.playParam ={
        pringLog:false,
        isDebug:true,
        isFlv:true,
        videoBuffer:0.2, //缓存时长
        videoBufferDelay:1,
        useMSE:true,//MediaSource
        useSIMD:false, //WASM(SIMD)
        useWCS:false, //Webcodec
        useSIMDMThreading:true,//启动多线程（WASM,WASM(SIMD)解码支持）
        showOperateBtns: true, // 显示网速
        forceNoOffscreen: true, //显示性能
        renderDom:"video",
        isUseWebGPU:'webgpu',//webgl
        demuxUseWorker:true,//硬解码(MediaSource，Webcodec)worker解封装
      }
    })*/

  }


}
</script>
<style lang="less">
.main_compent{
  width:100%;
  height:100%;

}
.box_site11 {
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.15);
  display: flex;
  flex-wrap: wrap;
  border-radius: 2px;
}
</style>
